package com.dongdong.bookstore.module.ums.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dongdong.bookstore.module.ums.model.Admin;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dongdong.bookstore.module.ums.viewmodel.AdminWithLastLoginTime;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 管理员表 Mapper 接口
 * </p>
 *
 * @author chiangkai
 * @since 2021-10-20
 */
public interface AdminMapper extends BaseMapper<Admin> {

    List<Long> getAdminIdList(@Param("resourceId") Long resourceId);

    IPage<AdminWithLastLoginTime> getListWithLastLoginTime( Page<AdminWithLastLoginTime> page, @Param(Constants.WRAPPER) QueryWrapper<AdminWithLastLoginTime> wrapper);
}
